const service = require('../service/label_service')

class LabelController{
  async create(ctx,next){
    const {name} = ctx.request.body
    const result = await service.create(name)
    ctx.body = result
  }

  async list(ctx,next){
    const {limit,page} = ctx.query
    const result = await service.getLabelList(limit,page)
    ctx.body = result
  }
}

module.exports = new LabelController()